package com.dv.shell.service.impl;

import com.dv.shell.dao.ProductCategoryDao;
import com.dv.shell.entity.ProductCategory;
import com.dv.shell.service.CategoryServie;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author DavidLoman
 * @create 2021/3/22 1:07
 */
@Service
public class CategoryServiceImpl implements CategoryServie {

    @Autowired
    private ProductCategoryDao productCategoryDao;

    @Override
    public ProductCategory findone(Integer categoryId) {
        return productCategoryDao.findOne(categoryId);
    }

    @Override
    public List<ProductCategory> findAll() {
        return productCategoryDao.findAll();
    }

    @Override
    public List<ProductCategory> findByCategoryTypeIn(List<Integer> productCategoryList) {
        return productCategoryDao.findByCategoryTypeIn(productCategoryList);
    }

    @Override
    public ProductCategory save(ProductCategory productCategory) {
        return productCategoryDao.save(productCategory);
    }
}
